//
//  CLHomeViewController.swift
//  SinaCaoliang
//
//  Created by 曹亮 on 16/10/22.
//  Copyright © 2016年 曹亮. All rights reserved.
//

import UIKit

class CLHomeViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        //设置视图
        setupUI()




    }
    // MARK: - 设置视图
    private func setupUI(){

        //首页扫一扫按钮
        navigationItem.leftBarButtonItem = UIBarButtonItem(setImgName: "navigationbar_pop", backgroundImgName: nil, target: self, action: #selector(leftBtnClick))

        //首页添加好友按钮
        navigationItem.rightBarButtonItem = UIBarButtonItem(setImgName: "navigationbar_friendsearch", backgroundImgName: nil, target: self, action: #selector(rightBtnClick))

    }

    ///监测扫一扫按钮点击方法
    func leftBtnClick() -> Void {
        print("扫一扫")
    }

    ///监测push按钮点击方法
    func rightBtnClick() -> Void {
        
        let tempVc = CLTempViewController()

        navigationController?.pushViewController(tempVc, animated: true)
     
    }

}
